home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / vars.Z / vars
Encoding:
Text File  |  1998-10-28  |  1.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4.      vvvvaaaarrrrssss((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))           vvvvaaaarrrrssss((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       vars - Perl pragma to    predeclare global variable names
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           use vars qw($frob    @mung %seen);
  13.  
  14.  
  15.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.       This will predeclare all the variables whose names are in
  17.       the list, allowing you to use    them under "use    strict", and
  18.       disabling any    typo warnings.
  19.  
  20.       Unlike pragmas that affect the $^H hints variable, the use
  21.       vars and use subs declarations are not BLOCK-scoped.    They
  22.       are thus effective for the entire file in which they appear.
  23.       You may not rescind such declarations    with no    vars or    no
  24.       subs.
  25.  
  26.       Packages such    as the AAAAuuuuttttooooLLLLooooaaaaddddeeeerrrr and SSSSeeeellllffffLLLLooooaaaaddddeeeerrrr that delay
  27.       loading of subroutines within    packages can create problems
  28.       with package lexicals    defined    using my(). While the vvvvaaaarrrrssss
  29.       pragma cannot    duplicate the effect of    package    lexicals
  30.       (total transparency outside of the package), it can act as
  31.       an acceptable    substitute by pre-declaring global symbols,
  32.       ensuring their availability to the later-loaded routines.
  33.  
  34.       See the section on _P_r_a_g_m_a_t_i_c _M_o_d_u_l_e_s in the _p_e_r_l_m_o_d_l_i_b
  35.       manpage.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.